The present invention relates to a data processor which includes operation means, such as an arithmetic and logic operation unit or a shift operation unit, capable of processing data of a structure having a first information field and a second information field. By way of example, it relates to a technique which is effective when applied to the operations of abstract data each having a data field, and a tag field for expressing the type or attribute of data contained in the data field.
Abstract data in which the attribute or data type of data such as the integer type or the floating point type is expressed by a tag field is, for example, one of a data structure having a data field and the tag field within one word. An arithmetical or logical operation or a shift operation for such abstract data needs to be executed, in effect, for the information of the data fields, and the operated result is set as the information of the data field pairing with the tag field expressing the attribute thereof.
Heretofore, an arithmetic and logic operation unit or a barrel shifter has been constructed so as to execute an arithmetical or logical operation or a shift operation for the respective bits of data received as inputs. Accordingly, in a case where only partial fields contained in data to-be-processed are subjected to a substantial operation because of the property of the data structure thereof, as in the abstract data, there must be adopted a procedure wherein data fields and tag fields are separated from the data to-be-processed, the information items of the separated data fields are subjected to a predetermined operation, and a predetermined tag field is affixed to the operated result. Incidentally, an example of a literature in which a data processor is described is "LSI Handbook," p. 536, published by the Ohm-Sha, Ltd. on Nov. 30, 1984.